const timeStamp= new Date().getTime()
module.exports = {
    baseUrl: './',
    assetsDir: 'static',
    productionSourceMap: false,
    // devServer:{
    //     host:"localhost"
    // }
    devServer: {
        proxy: {
            // '/':{
            //     target:'http://192.168.1.103:8099',//内网地址
            //     // target:'http://125.39.179.246:8099',//服务器地址
            //     changeOrigin:true,
            //     pathRewrite:{
            //         '/api':''
            //     }
            // },
            '/other': {
                target: 'http://125.39.179.246:8099/franchise-business-api.jfzh.com.cn',
                changeOrigin: true,
                pathRewrite: {
                    '^/other': ''
                }
            }
        }
    },
    pwa: {
        iconPaths: {
            favicon32: './public/img/favicon.ico',
            favicon16: './public/img/favicon.ico',
            appleTouchTcom: './public/img/favicon.ico',
            maskIcon: './public/img/favicon.ico',
            msTileImage: './public/img/favicon.ico'
        }
    },
    configureWebpack: {
        output: {
            filename: `js/[name].js?v=${timeStamp}`,
            chunkFilename: `js/[name].js?v=${timeStamp}`,
        },
    },
    css: {
        // 输出重构 打包编译后的css文件名称，添加时间戳
        extract: {
            filename: `css/[name].${timeStamp}.css`,
            chunkFilename: `css/[name].${timeStamp}.css`,
        },
    }
}